package cn.gson.crm.controller.position;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.gson.crm.controller.BaseServlet;
import cn.gson.crm.model.dao.PositionDao;

/**
 * 删除职位
 */
@WebServlet("/position/delete")
public class PositionDeleteServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
	private PositionDao positionDao = new PositionDao();

	protected void get(HttpServletRequest request, HttpServletResponse response) throws Exception {
		String[] ids = request.getParameterValues("id");

		for (String id : ids) {
			positionDao.deletePositionById(0, id);
		}
		redirect("position/manager");
	}
}
